package cn.ltgodm.template.user.mapper;

import cn.ltgodm.template.common.domain.entity.Dept;
import cn.ltgodm.template.common.domain.vo.DeptVO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
* @author wenpeng
* @description 针对表【lt_dept(部门表)】的数据库操作Mapper
* @createDate 2024-03-17 22:12:11
* @Entity cn.ltgodm.template.common.domain.entity.Dept
*/
public interface DeptMapper extends BaseMapper<Dept> {

    IPage<DeptVO> selectDeptList(IPage<Dept> page, @Param("ew") LambdaQueryWrapper<Dept> lqw, @Param("params") Map<String, Object> params);

    DeptVO selectDeptById(Long deptId);

    Dept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);

    List<DeptVO> selectChildrenDeptById(Long deptId);
}




